home *** CD-ROM | disk | FTP | other *** search
- function limpar()
- {
- var _loc2_ = 1;
- while(_loc2_ <= 31)
- {
- this["dia" + _loc2_ + "_mc"].enabled = false;
- this["dia" + _loc2_ + "_mc"].gotoAndStop("off");
- this["dia" + _loc2_ + "_mc"]._visible = false;
- _loc2_ = _loc2_ + 1;
- }
- }
- function actualizarData(mes, ano)
- {
- limpar();
- ano_txt.text = ano;
- switch(mes)
- {
- case 1:
- mes_txt.text = "Jan";
- diasMes = 31;
- break;
- case 2:
- mes_txt.text = "Fev";
- var _loc3_ = ano % 4;
- if(_loc3_ == 0)
- {
- diasMes = 29;
- }
- else
- {
- diasMes = 28;
- }
- break;
- case 3:
- mes_txt.text = "Mar";
- diasMes = 31;
- break;
- case 4:
- mes_txt.text = "Abr";
- diasMes = 30;
- break;
- case 5:
- mes_txt.text = "Mai";
- diasMes = 31;
- break;
- case 6:
- mes_txt.text = "Jun";
- diasMes = 30;
- break;
- case 7:
- mes_txt.text = "Jul";
- diasMes = 31;
- break;
- case 8:
- mes_txt.text = "Ago";
- diasMes = 31;
- break;
- case 9:
- mes_txt.text = "Set";
- diasMes = 30;
- break;
- case 10:
- mes_txt.text = "Out";
- diasMes = 31;
- break;
- case 11:
- mes_txt.text = "Nov";
- diasMes = 30;
- break;
- case 12:
- mes_txt.text = "Dez";
- diasMes = 31;
- }
- var _loc2_ = 1;
- while(_loc2_ <= diasMes)
- {
- this["dia" + _loc2_ + "_mc"]._visible = true;
- _loc2_ = _loc2_ + 1;
- }
- dias(mes,ano);
- }
- function informacao(ano, mes, dia)
- {
- var _loc14_ = _root.AnoArray[ano][0];
- var _loc13_ = _root["Meses" + ano][mes][0];
- var _loc12_ = _root["Meses" + ano + "Dias" + mes + "Array"][dia][0];
- if(_loc13_.length == 1)
- {
- _loc13_ = "0" + _loc13_;
- }
- if(_loc12_.length == 1)
- {
- _loc12_ = "0" + _loc12_;
- }
- _root.noticias_mc.data_txt.text = _loc12_ + "/" + _loc13_ + "/" + _loc14_;
- _root.noticias_mc.titulo_txt.text = _root["Meses" + ano + "Dias" + mes + "Array"][dia][1];
- _root.noticias_mc.texto_txt.text = _root["Meses" + ano + "Dias" + mes + "Array"][dia][2];
- _global.id = _root["Meses" + ano + "Dias" + mes + "Array"][dia][3];
- _root.comentarios_mc.texto_txt.text = "";
- comentarios_num = _root["ComentarioAno" + ano + "Mes" + mes + "Dia" + dia + "Array"].length;
- var _loc3_ = 0;
- while(_loc3_ < comentarios_num)
- {
- var _loc11_ = _root["ComentarioAno" + ano + "Mes" + mes + "Dia" + dia + "Array"][_loc3_][0];
- var _loc6_ = _root["ComentarioAno" + ano + "Mes" + mes + "Dia" + dia + "Array"][_loc3_][1];
- var _loc5_ = _root["ComentarioAno" + ano + "Mes" + mes + "Dia" + dia + "Array"][_loc3_][2];
- var _loc9_ = _root["ComentarioAno" + ano + "Mes" + mes + "Dia" + dia + "Array"][_loc3_][3];
- var _loc10_ = _root["ComentarioAno" + ano + "Mes" + mes + "Dia" + dia + "Array"][_loc3_][4];
- if(_loc6_.length < 2)
- {
- _loc6_ = "0" + _loc6_;
- }
- if(_loc5_.length < 2)
- {
- _loc5_ = "0" + _loc5_;
- }
- _root.comentarios_mc.texto_txt.htmlText += "<font color=\'#FF9900\'>" + _loc5_ + "/" + _loc6_ + "/" + _loc11_ + "</font><br>";
- _root.comentarios_mc.texto_txt.htmlText += _loc9_ + "<br>";
- _root.comentarios_mc.texto_txt.htmlText += _loc10_ + "<br><br>";
- _loc3_ = _loc3_ + 1;
- }
- }
- function dias(mes, ano)
- {
- var j = 0;
- while(j < _root.AnoArray.length)
- {
- if(_root.AnoArray[j][0] == ano)
- {
- var i = 0;
- while(i < _root["Meses" + j].length)
- {
- if(_root["Meses" + j][i][0] == mes)
- {
- var z = 0;
- while(z < _root["Meses" + j + "Dias" + i + "Array"].length)
- {
- dia = _root["Meses" + j + "Dias" + i + "Array"][z][0];
- this["dia" + dia + "_mc"].gotoAndStop("on");
- this["dia" + dia + "_mc"].j = j;
- this["dia" + dia + "_mc"].i = i;
- this["dia" + dia + "_mc"].z = z;
- this["dia" + dia + "_mc"].onRelease = function()
- {
- informacao(this.j,this.i,this.z);
- };
- this["dia" + dia + "_mc"].enabled = true;
- z++;
- }
- }
- i++;
- }
- }
- j++;
- }
- }
- function recentes()
- {
- anoRec = _root.AnoArray.length - 1;
- mesRec = _root["Meses" + anoRec].length - 1;
- diaRec = _root["Meses" + anoRec + "Dias" + mesRec + "Array"].length - 1;
- informacao(anoRec,mesRec,diaRec);
- }
- var seta = "off";
- var dataActual = new Date();
- var mesActual = dataActual.getMonth() + 1;
- var anoActual = dataActual.getFullYear();
- actualizarData(mesActual,anoActual);
- recentes();
- setaDir_mc.onRollOver = function()
- {
- seta = "dir";
- };
- setaDir_mc.onRollOut = function()
- {
- seta = "off";
- };
- setaDir_mc.onReleaseOutside = function()
- {
- seta = "off";
- };
- setaEsq_mc.onRollOver = function()
- {
- seta = "esq";
- };
- setaEsq_mc.onRollOut = function()
- {
- seta = "off";
- };
- setaEsq_mc.onReleaseOutside = function()
- {
- seta = "off";
- };
- setaDir_mc.onRelease = function()
- {
- if(mesActual < 12)
- {
- mesActual += 1;
- }
- else
- {
- mesActual = 1;
- anoActual += 1;
- }
- actualizarData(mesActual,anoActual);
- };
- setaEsq_mc.onRelease = function()
- {
- if(mesActual > 1)
- {
- mesActual -= 1;
- }
- else
- {
- mesActual = 12;
- anoActual -= 1;
- }
- actualizarData(mesActual,anoActual);
- };
- this.onEnterFrame = function()
- {
- switch(seta)
- {
- case "dir":
- setaDir_mc.nextFrame();
- setaEsq_mc.prevFrame();
- break;
- case "esq":
- setaDir_mc.prevFrame();
- setaEsq_mc.nextFrame();
- break;
- case "off":
- setaDir_mc.prevFrame();
- setaEsq_mc.prevFrame();
- }
- };
-